import Mock from 'mockjs';
import API from '@/api';
import { get, post, qsUrl } from '@/utils'; // eslint-disable-line

// 配置 ajax 请求响应时间
Mock.setup({
    // 设置 Mock 请求延迟
    timeout: 200
});

// token
API.admin.token.enable && Mock.mock(get(API.admin.token.url), 'get', function(req) {
    return {
        "code": 0,
        "data": 'abc',
        "message": "success"
    };
});

// roles
API.admin.roles.enable && Mock.mock(get(API.admin.roles.url), 'get', function(req) {
    return {
        "code": 0,
        "data": ["超级管理员"],
        "message": "success"
    };
});